package com.cgtong.android.http;

import com.cgtong.android.util.FileUtils;

import java.text.SimpleDateFormat;

/**
 * Created by zhuqingchun
 * 2017/9/30 16:54.
 */

public class ConstantManager {

    //http请求成功状态码
    public final static int HTTP_SUCESS = 0;
    //AccessToken错误或已过期
    public static final int ACCESS_TOKEN_EXPIRED = -1;
    public static final int ACCESS_USER_FORBIDDEN = -9000;

    //用户不存在
    public static final int CODE_USER_NO_EXISTS = -1005;

    public static final String LOCATION_TAG = "location_tag";
    public static final String FILTER_TAG = "filter_tag";
    public static final String FILTER_TIME_AREA_TAG = "filter_time_area_tag";
    public static final String UPDATE_FOLLOWED_USER_STATUS_TAG = "followed_user_status";
    public static final String RELOGIN_TAG = "relogin_tag";
    public static final String DELETE_REPORT_TAG = "delete_report_tag";
    public static final int RELOGIN_CODE_EXPIRED = -10000;
    public static final int RELOGIN_CODE_FORBIDDEN = -20000;

    public static final int DEFAULT_MAX_AUDIO_RECORD_TIME_SECOND = 60;
    //语音存放位置
    public static final String AUDIO_SAVE_DIR = FileUtils.getDir("audio");
    //照片存放位置
    public static final String PHOTO_SAVE_DIR = FileUtils.getDir("photo");
    //下载原图存放位置
    public static final String ORIGINAL_PHOTO_SAVE_DIR = FileUtils.getDir("original_photo");
    //百度地图快照位置
    public static final String LOCATION_PHOTO_SAVE_DIR = FileUtils.getDir("location_photo");
    //奔溃日志存放位置
    public static final String CRASH_SAVE_DIR = FileUtils.getDir("crash");//Android/data/包名/
    //登出
    public static final int LOGIN_OUT = 1;
    //登录
    public static final int LOGIN_IN = 2;
    //登录请求code
    public static final int REQUEST_LOGIN_CODE = 0x15;
    //首页页面索引
    public static final int MAIN_PAGE_INDEX = 1;
    //首页显示最多活动数
    public static final int HOME_MAX_ACTIVITIES = 6;
    //首页显示最多资讯数
    public static final int HOME_MAX_NEWS = 10;
    //首页显示最多轮回广告
    public static final int HOME_MAX_BANNER_LIST = 6;
    //地图请求code
    public static final int REQUEST_MAP_CODE = 0x16;

    public static final SimpleDateFormat YYYY_MM_DD_FORMAT = new SimpleDateFormat("yyyy-MM-dd");
    public static final SimpleDateFormat YYYY_MM_FORMAT = new SimpleDateFormat("yyyy-MM");

    //问题分页请求返回条数
    public static final int PROBLEMS_PAGE_SIZE = 10;
    //问题统计最大返回数
    public static final int PROBLEMS_MAX_MONTH_REPORT_COUNT = 10;
    public static final int MY_REPORTS_PAGE_SIZE = 10;
    public static final String PROBLEM_FOLLOWED_PAGE_SIZE = "10";
    public static final int PROBLEM_FOLLOWED_PAGE_SIZE_INT = 10;
    public static final String USER_FOLLOWED_PAGE_SIZE = "10";
    public static final int USER_FOLLOWED_PAGE_SIZE_INT = 10;


    //精彩活动一页最多展示条数
    public static final int MAX_WONDERFUL_NEWS_COUNT = 10;

    public static final int MB_1 = 1024 * 1024;

    public interface MsgType {
        //        (1系统公告，2活动通知，3问题受理通知，4互动通知)
        int NOTICE = 1;
        int INFORM = 2;
        int RECEPT = 3;
        int INTER = 4;
    }

    public interface ReadStatus {
        int UNRED = 0;
        int REDED = 1;
    }

    public static final String PLATFORM = "android";

    public static final String AUDIO_PREFIX = "file://";

    //版本更新
    public static final int VERSION_UPDATE_EXIT = 1; //退出
    public static final int VERSION_UPDATE_ENFORCE = 2; //强制更新
    public static final int VERSION_UPDATE_INGORE = 3; //忽略更新
    public static final int VERSION_UPDATE_NORMAL = 4; //正常更新
    public static final int VERSION_UPDATE_UI = 5; //处理UI

    //广告栏目位
    public static final int BANNER_COLUMN_HOME = 1;
    public static final int BANNER_COLUMN_NEWS = 2;
    public static final int BANNER_COLUMN_ACTIVITY = 3;
    //请求code为0代表成功
    public static final int RESULT_SUCCESS = 0;
    //是否第一次验证token
    public static final String FIRST_TOKEN_VALIDATE = "fist_token_validate";
    //发送验证码Type值
    public static final String VALID_CODE_REGISTER = "1001";
    public static final String VALID_CODE_LOGIN = "1002";
    public static final String VALID_CODE_FORGET_PWD = "1005";
}